<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>3dchess: AnimationHelper Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">3dchess
   </div>
   <div id="projectbrief">Basic chess application with OpenGL graphics and AI</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="class_animation_helper-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">AnimationHelper Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The class helps to create animations by providing time dependent methods.  
 <a href="class_animation_helper.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_animation_helper_8h_source.html">AnimationHelper.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a624ea97cafa70ccba957bc0a3ab2ca27"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_animation_helper.html#a624ea97cafa70ccba957bc0a3ab2ca27">FunctionType</a> { <a class="el" href="class_animation_helper.html#a624ea97cafa70ccba957bc0a3ab2ca27a564584bb2d34a16242ce4dacb3bc1686">EASE_LINEAR</a>, 
<a class="el" href="class_animation_helper.html#a624ea97cafa70ccba957bc0a3ab2ca27a55bd07a7d71db487b17255ba3f019f01">EASE_OUTSINE</a>
 }</td></tr>
<tr class="memdesc:a624ea97cafa70ccba957bc0a3ab2ca27"><td class="mdescLeft">&#160;</td><td class="mdescRight">The possible time function types.  <a href="class_animation_helper.html#a624ea97cafa70ccba957bc0a3ab2ca27">More...</a><br/></td></tr>
<tr class="separator:a624ea97cafa70ccba957bc0a3ab2ca27"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aaef3357374d479e1a77eb53af71bd6e2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_animation_helper.html#aaef3357374d479e1a77eb53af71bd6e2">AnimationHelper</a> (const int duration)</td></tr>
<tr class="memdesc:aaef3357374d479e1a77eb53af71bd6e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new <a class="el" href="class_animation_helper.html" title="The class helps to create animations by providing time dependent methods. ">AnimationHelper</a> object.  <a href="#aaef3357374d479e1a77eb53af71bd6e2">More...</a><br/></td></tr>
<tr class="separator:aaef3357374d479e1a77eb53af71bd6e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74d1d1a881eca49206047bb1fad3353c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_animation_helper.html#a74d1d1a881eca49206047bb1fad3353c">setStartNowOrKeepIt</a> ()</td></tr>
<tr class="memdesc:a74d1d1a881eca49206047bb1fad3353c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the current time as start point for the animation.  <a href="#a74d1d1a881eca49206047bb1fad3353c">More...</a><br/></td></tr>
<tr class="separator:a74d1d1a881eca49206047bb1fad3353c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a388310d57702714f211fa942acd0bf17"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a388310d57702714f211fa942acd0bf17"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_animation_helper.html#a388310d57702714f211fa942acd0bf17">reset</a> ()</td></tr>
<tr class="memdesc:a388310d57702714f211fa942acd0bf17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets the start time stamp to the current time. <br/></td></tr>
<tr class="separator:a388310d57702714f211fa942acd0bf17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62d475d64fe53339c09a59aadee57332"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_animation_helper.html#a62d475d64fe53339c09a59aadee57332">ease</a> (<a class="el" href="class_animation_helper.html#a624ea97cafa70ccba957bc0a3ab2ca27">FunctionType</a> type, const float lowerBound, const float upperBound)</td></tr>
<tr class="memdesc:a62d475d64fe53339c09a59aadee57332"><td class="mdescLeft">&#160;</td><td class="mdescRight">The percentage of the range between the lowerBound and upperBound.  <a href="#a62d475d64fe53339c09a59aadee57332">More...</a><br/></td></tr>
<tr class="separator:a62d475d64fe53339c09a59aadee57332"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aecc3321ed8fdb198f8e263a4213194e9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_animation_helper.html#aecc3321ed8fdb198f8e263a4213194e9">hasStopped</a> ()</td></tr>
<tr class="memdesc:aecc3321ed8fdb198f8e263a4213194e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the status of the animation.  <a href="#aecc3321ed8fdb198f8e263a4213194e9">More...</a><br/></td></tr>
<tr class="separator:aecc3321ed8fdb198f8e263a4213194e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a5fc6e9337ab0e5b4535b820700e82f86"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_animation_helper.html#a5fc6e9337ab0e5b4535b820700e82f86">getElapsedTime</a> ()</td></tr>
<tr class="memdesc:a5fc6e9337ab0e5b4535b820700e82f86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the elapsed time since the animation was started.  <a href="#a5fc6e9337ab0e5b4535b820700e82f86">More...</a><br/></td></tr>
<tr class="separator:a5fc6e9337ab0e5b4535b820700e82f86"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:aa461e50d142a81a16469871cc6ec3ccc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa461e50d142a81a16469871cc6ec3ccc"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_animation_helper.html#aa461e50d142a81a16469871cc6ec3ccc">m_duration</a></td></tr>
<tr class="memdesc:aa461e50d142a81a16469871cc6ec3ccc"><td class="mdescLeft">&#160;</td><td class="mdescRight">The duration of the animation in miliseconds. <br/></td></tr>
<tr class="separator:aa461e50d142a81a16469871cc6ec3ccc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee168e545bc449a248d9424433486b21"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee168e545bc449a248d9424433486b21"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_animation_helper.html#aee168e545bc449a248d9424433486b21">m_startTime</a></td></tr>
<tr class="memdesc:aee168e545bc449a248d9424433486b21"><td class="mdescLeft">&#160;</td><td class="mdescRight">The start time of the animation. <br/></td></tr>
<tr class="separator:aee168e545bc449a248d9424433486b21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a61feecea28ec2034aa9d207ab50684"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4a61feecea28ec2034aa9d207ab50684"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_animation_helper.html#a4a61feecea28ec2034aa9d207ab50684">m_completeness</a></td></tr>
<tr class="memdesc:a4a61feecea28ec2034aa9d207ab50684"><td class="mdescLeft">&#160;</td><td class="mdescRight">The completeness of the animation (1/100 percent, 0.0 - 1.0). <br/></td></tr>
<tr class="separator:a4a61feecea28ec2034aa9d207ab50684"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d6bbae65576765fd9e20e0ca3662c95"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6d6bbae65576765fd9e20e0ca3662c95"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_animation_helper.html#a6d6bbae65576765fd9e20e0ca3662c95">m_easingResult</a></td></tr>
<tr class="memdesc:a6d6bbae65576765fd9e20e0ca3662c95"><td class="mdescLeft">&#160;</td><td class="mdescRight">The calculated result of the animation. <br/></td></tr>
<tr class="separator:a6d6bbae65576765fd9e20e0ca3662c95"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The class helps to create animations by providing time dependent methods. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a624ea97cafa70ccba957bc0a3ab2ca27"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="class_animation_helper.html#a624ea97cafa70ccba957bc0a3ab2ca27">AnimationHelper::FunctionType</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The possible time function types. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a624ea97cafa70ccba957bc0a3ab2ca27a564584bb2d34a16242ce4dacb3bc1686"></a>EASE_LINEAR</em>&#160;</td><td class="fielddoc">
<p>Linear. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a624ea97cafa70ccba957bc0a3ab2ca27a55bd07a7d71db487b17255ba3f019f01"></a>EASE_OUTSINE</em>&#160;</td><td class="fielddoc">
<p>Sinus like curve. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aaef3357374d479e1a77eb53af71bd6e2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">AnimationHelper::AnimationHelper </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>duration</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new <a class="el" href="class_animation_helper.html" title="The class helps to create animations by providing time dependent methods. ">AnimationHelper</a> object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">duration</td><td>The period how long the animation should took. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a62d475d64fe53339c09a59aadee57332"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float AnimationHelper::ease </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_animation_helper.html#a624ea97cafa70ccba957bc0a3ab2ca27">FunctionType</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"><em>lowerBound</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"><em>upperBound</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The percentage of the range between the lowerBound and upperBound. </p>
<dl class="section note"><dt>Note</dt><dd>The lowerBound must be less than upperBound. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>One of the FunctionType as defined above. </td></tr>
    <tr><td class="paramname">lowerBound</td><td>The lower bound of the range. </td></tr>
    <tr><td class="paramname">upperBound</td><td>The upper bound of the range. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The numeric value in percent. This will show the completeness of the animation in percent between 0.0 and 1.0; </dd></dl>

</div>
</div>
<a class="anchor" id="a5fc6e9337ab0e5b4535b820700e82f86"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int AnimationHelper::getElapsedTime </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets the elapsed time since the animation was started. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of miliseconds since the animation was started. </dd></dl>

</div>
</div>
<a class="anchor" id="aecc3321ed8fdb198f8e263a4213194e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool AnimationHelper::hasStopped </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the status of the animation. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the animation was started and has already finished. False if not. </dd></dl>

</div>
</div>
<a class="anchor" id="a74d1d1a881eca49206047bb1fad3353c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void AnimationHelper::setStartNowOrKeepIt </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the current time as start point for the animation. </p>
<p>If this method is called multiple times, only the first call will take effect. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>S:/dev/3dchess/src/gui/<a class="el" href="_animation_helper_8h_source.html">AnimationHelper.h</a></li>
<li>S:/dev/3dchess/src/gui/AnimationHelper.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Mar 9 2014 23:12:57 for 3dchess by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
